package com.sanbi.shield.server.repository.mapping;

import com.sanbi.shield.server.common.bean.bo.UserInfoBO;
import com.sanbi.shield.server.jdbc.domain.UserInfo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 * 用户信息Mapping
 *
 * @author XiaoQingqing
 * @since 2024/07/25
 */
@Mapper(componentModel = "spring")
public interface UserInfoMapping {

    /**
     * 转换为DO对象
     *
     * @param bo BO对象
     * @return DO对象
     */
    @Mapping(target = "extraInfo", ignore = true)
    UserInfo toDO(UserInfoBO bo);

    /**
     * 转换为BO对象
     *
     * @param domain DO对象
     * @return BO对象
     */
    @Mapping(target = "extraInfo", ignore = true)
    UserInfoBO toBO(UserInfo domain);

}
